package com.itheima;

import com.itheima.dao.BookDao;
import com.itheima.service.BookService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("application.xml");

        // BookDao bookDao = (BookDao) applicationContext.getBean("bookDao");
        // bookDao.save();

        BookService bookService = (BookService) applicationContext.getBean("bookService");
        bookService.save();
    }
}
